import request from '@/utils/request'

export default {
    //添加、修改友链
    saveOrUpdateLink(link) {
        return request({
            url: `/admin/link`,
            method: 'post',
            data: link
        })
    },
    //审核
    check(link) {
        return request({
            url: `/admin/link`,
            method: 'put',
            data: link
        })
    },
    //后台友链列表
    backLinkList(condition) {
        return request({
            url: `/admin/links`,
            method: 'post',
            data: condition
        })
    },
    //删除友链
    deleteLinks(idList) {
        console.log('idlist:',idList);
        
        return request({
            url: `/admin/links`,
            method: 'delete',
            data: idList
        })
    },
}